﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Promotions.aspx.cs" Inherits="RedHouse.Web.Promotions" %>
    <%@ Register Src="~/UserControls/UCPromotionDetail.ascx" TagPrefix="uc" TagName="ucDetail" %>
    <%@ Register Src="~/UserControls/UCPromotionList.ascx" TagPrefix="uc" TagName="ucList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script type='text/javascript' src='Scripts/jquery.cookie.js'></script>
    <script type='text/javascript' src='Scripts/jquery.hoverIntent.minified.js'></script>
    <script type='text/javascript' src='Scripts/jquery.dcjqaccordion.2.7.min.js'></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $('#accordion-menu').dcAccordion({
                eventType: 'click',
                autoClose: true,
                saveState: true,
                disableLink: true,
                speed: 'fast',
                classActive: 'test',
                showCount: false,
                classActive: 'active'
            });
            $("#nav li").removeClass("active");
            $("#menu-promotion").addClass("active");
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="col-left">
        <div class="left-title">
            <h1><%=RedHouse.Web.Resources.lblPromotions %></h1>
        </div>
        <div class="left-content">
            <ul class="accordion promotion" id="accordion-menu">
                <li><a href="Promotions.aspx?view=1" class="level-1">&nbsp;&nbsp;&nbsp;&nbsp;<%=RedHouse.Web.Resources.lnkCurrent %></a>
                    <ul>
                        <%foreach (RedHouse.Data.Entities.RedHouseNews item in NewsList)
                          {
                              if (item.EndDate.Value >= DateTime.Now)
                              {
                                %>
                                    <li><a id="<%=item.Id %>" href="promotions.aspx?id=<%=item.Id %>">&nbsp;&nbsp;&nbsp;&nbsp;<%=item.NewsDetail.Title%></a></li>
                                <%
                              }
                          }%>
                    </ul>
                </li>
                <li><a href="Promotions.aspx?view=2" class="level-1">&nbsp;&nbsp;&nbsp;&nbsp;<%=RedHouse.Web.Resources.lnkPrevious %></a>
                    <ul>
                        <%foreach (RedHouse.Data.Entities.RedHouseNews item in NewsList)
                          {
                              if (item.EndDate.Value < DateTime.Now)
                              {
                                %>
                                    <li><a id="<%=item.Id %>" href="promotions.aspx?id=<%=item.Id %>">&nbsp;&nbsp;&nbsp;&nbsp;<%=item.NewsDetail.Title%></a></li>
                                <%
                              }
                          }%>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
    <!-- END .col-left -->
    <div class="col-main">
        <div class="main-title">
            <h1>
            </h1>
        </div>
        <div class="main-content">
           <uc:ucDetail ID="ucDetail" runat ="server" />
           <uc:ucList ID="ucList" runat ="server" />
        </div>
    </div>
    <!-- END .col-main -->
</asp:Content>
